<div class="icx-mobi-home" style="padding-bottom:0">
<div style="display:none;">
    Ta关注:{{pagedata.item.attention}} {{pagedata.item.find}}
</div>
<div class="icx-mobi-page toggle-transition-1s namecard-page-relative">
    <main class="container">
        <section class="carousel js-carousel">
			<style>
			.showcode {position: fixed;top:20rem;right:0;padding:0.15rem;font-size:0.6rem;color:#fff;z-index:18;background-color: rgba(0,0,0,0.7);border-top-left-radius:1rem;border-bottom-left-radius:1rem;}
			</style>
			<div ng-if="pagedata.owner" class="showcode r-f" style="top:20rem;" onclick="$('#share_img').show()">分享名片 <i class="icon icon-qrcode" style="color:#fff;font-size: 0.6rem;"></i></div>
			<div ng-if="pagedata.owner"  class="showcode r-f" style="top:22rem;" ng-click="pagedata.show_right()">更多 <i class="icon icon-skip" style="color:#fff;font-size: 0.6rem;"></i></div>
            <div ng-if="!pagedata.owner"  class="showcode r-f" style="top:20rem;" onclick="collectAjax();">收藏TA <i class="icon icon-shoucang" style="color:#fff;font-size: 0.6rem;"></i></div>
			<div ng-if="!pagedata.owner"  class="showcode r-f" style="top:22rem;" href="javascript:;" ng-click="access_json('/index/')">我的微名片 <i class="icon icon-youhuiquan1" style="color:#fff;font-size: 0.6rem;"></i></div>
			<div ng-if="!pagedata.owner"  class="showcode r-f" style="top:24rem;" href="javascript:;" ng-click="access_json('/info/')">我也要一个 <i class="icon icon-zhifeiji" style="color:#fff;font-size: 0.6rem;"></i></div>
			<ul class="carousel-inner">
                <li class="carousel-item">
                <img ng-src="{{tomedia(pagedata.item.bgimg)}}" class="carousel-item-pic">
                </li>
            </ul>
        </section>
        <div class="topbar">{{pagedata.item.company}}</div>
        <div class="infobar">
            <ul class="infobar-inner">
                <li class="content-item">
                    <a href="javascript:;" ng-click="access_json('/renmai//mid='+pagedata.item.mid)"  class="content-item-anchor">
                        <div class="content-item-hgroup">
                            <h2 class="content-item-title">人脉</h2>
                            <h3 class="content-item-summary">{{pagedata.renmai}}</h3>
                        </div>
                    </a>
                </li>
                <li class="content-item">
                <a href="javascript:;" ng-click="access_json('/home/mid='+pagedata.item.mid)"  class="content-item-anchor">
                    <div class="content-item-thumb">
                    <img ng-src="{{tomedia(pagedata.item.avatar) || '../addons/jy_business_card/resource/images/header.png'}}" class="content-item-thumbnail avatarPic">
                    </div>
                </a>
                </li>
                <li class="content-item js-ewm" ng-click="pagedata.show_ewm=true">
                    <a href="javascript:;" class="content-item-anchor">
                        <div class="content-item-thumb">
							<img ng-src="{{plugin_resource+'images/icon-qrcode.png'}}"  class="content-item-thumbnail">
                        </div>
                    </a>
                </li>

                <li class="content-item">
                    <a href="javascript:;" class="content-item-anchor">
                        <div class="content-item-hgroup">
                            <h2 class="content-item-title" style="font-size:18px">{{pagedata.item.name}}</h2>
                            <h3 class="content-item-summary">{{pagedata.item.position}}</h3>
                        </div>
                    </a>
                </li>
            </ul>
        </div>
        <div class="like-item" >
            <a href="javascript:;" ng-click="pagedata.do_like()">
                <span class="item-round"><i class="ico-hand"></i></span>
				<span class="home-number info-number">
                {{pagedata.zan}}
				</span>
            </a>
        </div>
        <section class="cateContent">
            <ul class="content-inner">
                <li class="content-item js-content-item">

				<a href="javascript:;" ng-click="access_json('/shop//mid='+pagedata.item.mid)" class="content-item-anchor">

                    <div class="content-item-thumb">
                    <img ng-src="{{plugin_resource+'images/1.png'}}" class="content-item-thumbnail" >
                    </div>
                    <div class="content-item-hgroup">
                        <h2 class="content-item-title">小店商城</h2>
                    </div>
                </a>
                        <div class="content-item-bg"></div>
                </li>

                <li class="content-item js-content-item">

                    <a href="javascript:;" ng-click="access_json('/presence//mid='+pagedata.item.mid)" class="content-item-anchor">
                   
                    <div class="content-item-thumb">
                        <img ng-src="{{plugin_resource+'images/2.png'}}"  class="content-item-thumbnail" >
                    </div>
                    <div class="content-item-hgroup">
                        <h2 class="content-item-title">个人风采</h2>
                    </div>
                    </a>
                    <div class="content-item-bg"></div>
                </li>

                <li class="content-item js-content-item">
                    <a href="javascript:;" ng-click="access_json('/photo//mid='+pagedata.item.mid)" class="content-item-anchor">
                    <div class="content-item-thumb">
                        <img ng-src="{{plugin_resource+'images/3.png'}}" class="content-item-thumbnail">
                    </div>
                    <div class="content-item-hgroup">
                        <h2 class="content-item-title">精彩相册</h2>
                    </div>
                    </a>
                      <div class="content-item-bg"></div>
                </li>
                <li class="content-item js-content-item">
                   <a href="javascript:;"  ng-click="access_json('/address//mid='+pagedata.item.mid)" class="content-item-anchor">
                    <div class="content-item-thumb">
                        <img ng-src="{{plugin_resource+'images/4.png'}}" class="content-item-thumbnail">
                    </div>
                    <div class="content-item-hgroup">
                        <h2 class="content-item-title">公司地址</h2>
                    </div>
                    </a>
                    <div class="content-item-bg"></div>
                </li>

                <li class="content-item js-content-item" >
                    <a href="javascript:;" ng-click="access_json('/home//mid='+pagedata.item.mid)" class="content-item-anchor">
                        <div class="content-item-thumb">
                            <img ng-src="{{plugin_resource+'images/5.png'}}" class="content-item-thumbnail" >
                        </div>
                        <div class="content-item-hgroup">
                            <h2 class="content-item-title">个人信息</h2>
                        </div>
                    </a>

                    <div class="content-item-bg"></div>
                </li>
                <li class="content-item js-content-item">
                   <a href="javascript:;" ng-click="access_json('/company//mid='+pagedata.item.mid)" class="content-item-anchor">
                        <div class="content-item-thumb">
                            <img ng-src="{{plugin_resource+'images/6.png'}}" class="content-item-thumbnail" >
                        </div>
                        <div class="content-item-hgroup">
                            <h2 class="content-item-title">公司简介</h2>
                        </div>
                        </a>
                        <div class="content-item-bg"></div>
                </li>
                <li class="content-item">
                    <a href="javascript:;" class="content-item-anchor">
                        <div class="content-item-thumb">
                            <img ng-src="{{plugin_resource+'images/xbg.png'}}" class="content-item-thumbnail"></div>
                    </a>
                </li>
                <li class="content-item">
                    <a href="javascript:;" ng-click="pagedata.goto('mobile')" class="content-item-anchor">
                        <div class="content-item-thumb">
                            <img ng-src="{{plugin_resource+'images/tell.png'}}" class="content-item-thumbnail"></div>
							<div class="content-item-hgroup">
								<h2 class="content-item-title">一键拨号</h2>
							</div>
                    </a>
                </li>
            </ul>
        </section>
    </main>
</div>
<div class="more-list-wrap js-moreList" style="">
    <div class="more-list">
        <ul class="more-list-ul">
            <li class="more-list-item more-avatar">
			<a href="javascript:;" ng-click="access_json('/home/')" class="more-item-anchor">
                <div class="more-avatar-thumb">
                    <img  class="content-item-thumbnail avatarPic" ng-src="{{tomedia(pagedata.item.avatar)  || '../addons/jy_business_card/resource/images/header.png'}}">
                </div>
                <span class="vertical-m">{{pagedata.item.name}}</span>
			</a>
            </li>
            <li class="more-list-item">
                <a href="javascript:;" ng-click="access_json('/info/')" class="more-item-anchor">
                    <span class="vertical-m">个人信息</span><i class="icon-right"></i>
                </a>
            </li>
            <li class="more-list-item btop mb10">
                <a href="javascript:;" ng-click="access_json('/secret/')" class="more-item-anchor">
                    <span class="vertical-m">隐私设置</span><i class="icon-right"></i>
                </a>
            </li>
            <li class="more-list-item btop">
                <a href="javascript:;" ng-click="access_json('renmai/')" class="more-item-anchor">
                    <span class="vertical-m">我的人脉</span><i class="icon-right"></i>
                </a>
            </li>
            <!--<li class="more-list-item btop mb10">
                <a href="javascript:;" ng-click="access_json('recommend/')" class="more-item-anchor">
                    <span class="vertical-m">推荐人脉</span><i class="icon-right"></i>
                </a>
            </li>
            <li class="more-list-item btop">
                <a href="javascript:;" ng-click="access_json('card_edit/')" class="more-item-anchor">
                    <span class="vertical-m">编辑名片</span><i class="icon-right"></i>
                </a>
            </li>
			
            <li class="more-list-item btop">
                <a href="javascript:;" ng-click="access_json('template/')" class="more-item-anchor">
				<span class="vertical-m">更换模板</span>
                    <i class="icon-right"></i>
                </a>
            </li>
-->
            <li class="more-list-item btop">
                <a href="javascript:;" ng-click="access_json('/edit/')" class="more-item-anchor">
                    <span class="vertical-m">编辑名片</span><i class="icon-right"></i>
                </a>
            </li>
			<li class="more-list-item btop mb10">
                <a href="javascript:;" ng-click="access_json('/background/')" class="more-item-anchor">
                    <span class="vertical-m">更换背景</span><i class="icon-right"></i>
                </a>
            </li>
            <li class="more-list-item btop mb10">
                <a href="javascript:;" ng-click="access_json('/music/')" class="more-item-anchor">
                    <span class="vertical-m">更换音乐</span><i class="icon-right"></i>
                </a>
            </li>
        </ul>
    </div>
    <div class="more-list-item item-back">
		<a href="javascript:;" class="more-item-anchor">
			<i class="ico-back"></i>
			<span class="vertical-m" ng-click="pagedata.show_right()">返 回</span>
		</a>
	</div>
</div>
<div class="ewmform js-ewmform" style="display:block;" ng-show="pagedata.show_ewm">
    <div class="ewmform-box">
        <code class="ewmform-close js-ewmClose" ng-click="pagedata.show_ewm=false"></code>
        <div class="ewmform-title">扫码收藏我的微名片</div>
        <div class="ewmform-summary">
            <img class="ewm-thumbnail" id="ewmThumbnail" ng-src="{{tomedia(pagedata.item.ewm)  || '../addons/jy_business_card/resource/images/header.png'}}"
                 style="padding: 5px 0px 0 0;width:96%">
            <!-- -->
        </div>
        <div class="ewmform-des">长按二维码可识别二维码

        </div>
    </div>
</div>
<div class="superMask" id="superMask"></div>
<div ng-if="pagedata.item.music">
	<div class="musicBox play" id="musicBox" onclick="play_audio($('#musicPlayer'))"></div>
	<audio id="musicPlayer" loop ng-src="{{tomedia(pagedata.item.music)}}" autoplay="autoplay" style="display:none;position:absolute;z-index:-11"></audio>
</div>
<div id="share_img" onclick="$(this).hide()" style="display:none;position: fixed;width:100%;height:100%;left:0;top:0;z-index:99999;">
<img ng-src="{{plugin_resource+'images/share.jpg'}}" style="width:100%;height:100%">
</div>
</div>
<div class="popup" ng-if="pagedata.showtype">
	<div class="popup-body">
		<div class="popup-center" style="padding:1rem;">
			<i class="closed icon icon-cuowu" ng-click="pagedata.showtype=false"></i>
			<div class="weui_btn weui_btn_primary" ng-click="pagedata.pay()">付费看(￥{{pagedata.member_secret[pagedata.namefee] ||'0.00'}})</div>
		</div>
	</div>
</div>
<script>
scope.pagedata.access=function(action){
	if(scope.pagedata.owner){
		scope.access_json('/'+action+'/');
	}else{
		if(action=='renmai'){
			return false;
		}
		
		if(action=='shop'){
			if(!scope.pagedata.item.shop){
				scope.message('主人还没有设置此栏目哦~');
				return false;
			}
			window.location.href=scope.pagedata.item.shop;
			return false;
		}
		if(action=='lat_lng'){
			if(!scope.pagedata.item.lat_lng){
				scope.message('主人还没有设置此栏目哦~');
				return false;
			}
			scope.access_json('/'+action+'//mid='+scope.pagedata.item.mid);
			return false;
		}
		if(!scope.pagedata.more[action]){
			scope.message('主人还没有设置此栏目哦~');
			return false;
		}
		scope.access_json('/'+action+'//mid='+scope.pagedata.item.mid);
	}
}
scope.pagedata.do_like=function(){
	/*if(scope.pagedata.owner){
		scope.message('不能给自己点赞哦~');
		return false;
	}*/
	scope.post_json('like',{'mid':scope.pagedata.item.mid},function(res){
				if(res=='success'){
					scope.pagedata.zan++;
					scope.$evalAsync();
					scope.message('点赞成功！');
				}
	});
}
scope.pagedata.goto=function(name){
	if(scope.pagedata.owner || (name=='mobile' && scope.pagedata.member_secret.paymobile==1)){
		window.location.href ='tel://'+scope.pagedata.item.mobile
	}
	if(name=='mobile' && scope.pagedata.member_secret.paymobile!=1){
		scope.pagedata.showtype=true;
		scope.pagedata.namefee='mobile_fee';
		scope.$evalAsync();
	}
}
scope.pagedata.pay=function(){
	var complete_url='/index//mid='+scope.pagedata.item.mid;
	if(scope.pagedata.pay_id){
		scope.tool.pay(scope.pagedata.pay_id,function(res){
			if(res.type=='success'){
				scope.message('支付成功！','success',complete_url);
			}else{
				scope.message('支付失败！','success',complete_url);
			}
		},'','',complete_url,complete_url);
	}else{
		scope.post_json('/index/pay/',{'namefee':scope.pagedata.namefee,'tomid':scope.pagedata.item.mid},function(result){
				if(result.order_id){
					scope.pagedata.pay_id=result.pay_id;
					scope.$evalAsync();
					scope.tool.pay(result.pay_id,function(res){
						if(res.type=='success'){
							scope.message('支付成功！','success',complete_url);
						}else{
							scope.message('支付失败！','success',complete_url);
						}
					},'','',complete_url,complete_url);
				}else{
					scope.message(result);
				}
		});
	}
}
scope.pagedata.show_right=function(){
	$(".js-moreList,.item-back").toggleClass("more-list-sh");
	$("#superMask").toggleClass("show");
} 
</script>